import {createRouter, createWebHistory} from 'vue-router'
import ManagerLogin from "@/views/ManagerLogin.vue";
import ManagerResigter from "@/views/ManagerResigter.vue";
import ProductManagement from "@/views/ProductManagement.vue";
import AddProduct from "@/views/AddProduct.vue";
import ProductAlert from "@/views/ProductAlert.vue";

const routes = [
    {
        path:'/login',component:ManagerLogin
    },
    {
        path:"/register",component: ManagerResigter
    },
    {
        path:"/product",component: ProductManagement
    },
    {
        path: "/addproduct" ,component: AddProduct
    },
    {
        path: "/alertproduct",name:"updateProduct",component: ProductAlert
    }
]

//创建路由
const router = createRouter(
    {
        history: createWebHistory(),
        routes: routes
    }
)
export default router
